
<h1>Log in to <%= Settings::Community.community_name(subforem_id: subforem_id) %></h1>

<p>Hey <%= @user.name %>!</p>

<p>
To log in to your account, please use the following code:
</p>

<p class="code-display"
    style="font-size: 2.5em;
    font-weight: bold; 
    font-family: monospace;
    letter-spacing: 2px;
    color: #333; 
    background-color: #f0f0f0;
    padding: 10px 15px; 
    border-radius: 5px; /* Rounded corners */
    display: inline-block; /* Keep background contained */
    border: 2px dashed #ccc;
    margin-top: 5px;
    margin-bottom: 15px;">
  <%= @user.sign_in_token %> 
</p>

<p>
Enter this code in the application or on the login page where prompted.
</p>

<%# Secondary option: Direct login link %>
<div class="secondary-option"
  style=" margin-top: 20px;
          padding-top: 15px;
          border-top: 1px solid #ccc;">
<p>
  <strong>Alternatively</strong>, if you are on the device you wish to log in from, you can click this direct link:
</p>
<p>
  <%= link_to "log in via magic link", magic_link_url(@user.sign_in_token) %>
</p>
</div>

<%# Expiry information %>
<p class="expiry-note" style="font-size: 0.85em">
This code and the link will expire in 20 minutes. If they expire, please request a new one.
</p>

<p style="font-size: 0.85em">If you didn't request this login, you can safely ignore this email.</p>
